﻿@model Web.Models.LoginModel
@{
    Layout = "~/Views/Shared/_AuthLayout.cshtml";
    ViewBag.Title = "用户登录";
}


<center>
    <div class="login_wrapper" ng-controller="LoginController">
        <form class="form-horizontal" role="form">
            <fieldset>
                <legend>用户登录</legend>
                <div class="form-group">
                    <label for="accountName" class="col-sm-2 control-label">账号</label>
                    <div class="col-sm-6">
                        <input type="text" maxlength="128" id="accountName" class="form-control" ng-model="loginAccount.accountName" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="password" class="col-sm-2 control-label">密码</label>
                    <div class="col-sm-6">
                        <input type="password" maxlength="128" id="password" class="form-control" ng-model="loginAccount.password" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-6">
                        <input type="checkbox" id="rememberMe" ng-model="loginAccount.rememberMe" /> 下次自动登录
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-6">
                        <span class="error" ng-show="errorMsg != ''">{{errorMsg}}</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-6">
                        <button type="button" class="btn btn-primary" ng-click="submit()">提交</button>
                        <span style="margin-left:20px"></span>@Html.ActionLink("注册", "register") (如果你没有账号)。
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
</center>

@section Scripts {
    <script type="text/javascript">
        var returnUrl = '@ViewBag.ReturnUrl';
    </script>
    <script type="text/javascript" src="@Url.Content("~/content/controllers/login-controller.js")"></script>
}
